@echo off

%1 mshta vbscript:CreateObject("WScript.Shell").Run("%~s0 ::",0,FALSE)(window.close)&&exit
setlocal enabledelayedexpansion

:retry
ping -n 120 127.1 >nul
netstat -an|findstr 1300 >nul
if errorlevel 1 (
    goto restart
)

goto retry

:restart
start java -jar D:\app\rev\receive_ict_data-0.0.1-SNAPSHOT.jar > D:\app\rev\log\rev.log &
goto retry